package server.business.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.bind.annotation.RequestBody;
import server.business.pojo.SampleData;
import server.business.vo.Result;
import server.business.vo.ResultExpand;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @author ccb
 * @date 2022/07/25
 */
public interface SampleService extends IService<SampleData> {
    IPage<SampleData> selectByPage(int currentPage, int limit);

    List<SampleData> queryData();

    Result deleteById(Integer id);

    ResultExpand getPage(HttpServletRequest request, HttpServletResponse response);

    ResultExpand searchSample(HttpServletRequest request, HttpServletResponse response);

    Result addBloodSample(@RequestBody SampleData sampleData);

    Result receiveSample(@RequestBody SampleData sampleData);

    Result outSample(@RequestBody SampleData sampleData);

    Result discardSample(@RequestBody SampleData sampleData);

    void downloadExcel(HttpServletRequest request, HttpServletResponse response);
}
